Search completed in 0.82 seconds.
26 results for "[@@iterator]":
Your results are loading. Please wait...
Map.prototype[@@iterator]() - JavaScript
examples using [@@iterator]() const mymap = new map() mymap.set('0', 'foo') mymap.set(1, 'bar') mymap.set({}, 'baz') const mapiter = mymap[symbol.iterator]() console.log(mapiter.next().value) // ["0", "foo"] console.log(mapiter.next().value) // [1, "bar"] console.log(mapiter.next().value) // [object, "baz"] using [@@iterator]() with for..of const mymap = new map() mymap.set('0', 'foo') mymap.set(1, 'bar') mymap.set({}...
..., 'baz') for (const entry of mymap) { console.log(entry) } // ["0", "foo"] // [1, "bar"] // [{}, "baz"] for (const [key, value] of mymap) { console.log(`${key}: ${value}`) } // 0: foo // 1: bar // [object]: baz specifications specification ecmascript (ecma-262)the definition of 'map.prototype[@@iterator]()' in that specification.
Set.prototype[@@iterator]() - JavaScript
examples using [@@iterator]() const myset = new set(); myset.add('0'); myset.add(1); myset.add({}); const setiter = myset[symbol.iterator](); console.log(setiter.next().value); // "0" console.log(setiter.next().value); // 1 console.log(setiter.next().value); // object using [@@iterator]() with for..of const myset = new set(); myset.add('0'); myset.add(1); myset.add({}); for (const v of myset) { console.log(v); } ...
...specifications specification ecmascript (ecma-262)the definition of 'set.prototype[@@iterator]' in that specification.
String.prototype[@@iterator]() - JavaScript
the [@@iterator]() method returns a new iterator object that iterates over the code points of a string value, returning each code point as a string value.
... examples using [@@iterator]() var str = 'a\ud835\udc68'; var striter = str[symbol.iterator](); console.log(striter.next().value); // "a" console.log(striter.next().value); // "\ud835\udc68" using [@@iterator]() with for..of var str = 'a\ud835\udc68b\ud835\udc69c\ud835\udc6a'; for (var v of str) { console.log(v); } // "a" // "\ud835\udc68" // "b" // "\ud835\udc69" // "c" // "\ud835\udc6a" specifications specification ecmascript (ecma-262)the definition of 'string.prototype[@@itera...
Array.prototype[@@iterator]() - JavaScript
coped variables in for loops // const and var could also be used for (let letter of iterator) { console.log(letter); } } // array logiterable(['a', 'b', 'c']); // a // b // c // string logiterable('abc'); // a // b // c logiterable(123); // 123 " is not an iterable object..." specifications specification ecmascript (ecma-262)the definition of 'array.prototype[@@iterator]()' in that specification.
TypedArray.prototype[@@iterator]() - JavaScript
ive iteration var arr = new uint8array([10, 20, 30, 40, 50]); var earr = arr[symbol.iterator](); console.log(earr.next().value); // 10 console.log(earr.next().value); // 20 console.log(earr.next().value); // 30 console.log(earr.next().value); // 40 console.log(earr.next().value); // 50 specifications specification ecmascript (ecma-262)the definition of '%typedarray%.prototype[@@iterator]()' in that specification.
Iterator - Archive of obsolete content
properties iterator.prototype[@@iterator] returns a function that returns iterator object.
ECMAScript 2015 support in Mozilla - Archive of obsolete content
use symbol.iterator property (firefox 36) functions rest parameters (firefox 15) default parameters (firefox 15) parameters without defaults after default parameters (firefox 26) destructured parameters with default value assignment (firefox 41) arrow functions (firefox 22) generator function (firefox 26) yield (firefox 26) yield* (firefox 27) arguments[@@iterator] (firefox 46) other features binary and octal numeric literals (firefox 25) template strings (firefox 34) object initializer: shorthand property names (firefox 33) object initializer: computed property names (firefox 34) object initializer: shorthand method names (firefox 34) ...
MediaKeyStatusMap - Web APIs
mediakeystatusmap.[@@iterator]() read only returns a new iterator object containing an array of [key, value] for each element in the status map, in insertion order.
The arguments object - JavaScript
arguments[@@iterator] returns a new array iterator object that contains the values for each index in arguments.
Array - JavaScript
array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
BigInt64Array - JavaScript
bigint64array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
BigUint64Array - JavaScript
biguint64array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Float32Array - JavaScript
float32array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Float64Array - JavaScript
float64array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Int16Array - JavaScript
int16array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Int32Array - JavaScript
int32array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Int8Array - JavaScript
int8array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Map - JavaScript
iteration methods map.prototype[@@iterator]() returns a new iterator object that contains an array of [key, value] for each element in the map object in insertion order.
Set - JavaScript
iteration methods set.prototype[@@iterator]() returns a new iterator object that yields the values for each element in the set object in insertion order.
Symbol.iterator - JavaScript
the built-in types with a @@iterator method are: array.prototype[@@iterator]() typedarray.prototype[@@iterator]() string.prototype[@@iterator]() map.prototype[@@iterator]() set.prototype[@@iterator]() see also iteration protocols for more information.
TypedArray - JavaScript
typedarray.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Uint16Array - JavaScript
uint16array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Uint32Array - JavaScript
uint32array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Uint8Array - JavaScript
uint8array.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.
Uint8ClampedArray - JavaScript
uint8clampedarray.prototype[@@iterator]() returns a new array iterator object that contains the values for each index in the array.